package com.derbysoft.ota.application.translator.rs;

import com.derbysoft.modules.eip.translator.Translator;
import com.derbysoft.ota.interfaces.protocol._2009a.BasicPropertyInfoType.ContactNumbers.ContactNumber;
import com.derbysoft.remote.dswitch.generic.dto.TelephoneDTO;

public class TelephoneDTO2ContactNumberTranslator implements Translator<TelephoneDTO, ContactNumber> {
   
	@Override
    public ContactNumber translate(TelephoneDTO source) {
        ContactNumber contactNumber = new ContactNumber();
        contactNumber.setAreaCityCode(source.getAreaCityCode());
        contactNumber.setCountryAccessCode(source.getCountryAccessCode());
        contactNumber.setPhoneLocationType(source.getLocationType().getCode());
        contactNumber.setPhoneNumber(source.getNumber());
        contactNumber.setPhoneTechType(source.getTechType().getCode());
        contactNumber.setExtension(source.getExtension());
        contactNumber.setPIN(source.getPin());
        contactNumber.setRemark(source.getRemark());
        return contactNumber;
    }
}
